<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <style>
        button{
            border:1px solid red;
        }
    </style>
    <div class="contain">
        北京上海广州
        <span>深圳厦门</span>陕西西安
        <p style="display: none;">台湾香港澳门</p>
    </div>
    <button onclick="myFunction()">我是按钮</button>
    <script>
        function myFunction(){
            console.log(event.type);
        }
        let container = document.querySelector(".contain");
        console.log("textContent的内容是:",container.textContent);
        console.log("innerText的内容是:",container.innerText);
        console.log("innerHTML的内容是:",container.innerHTML);
        container.innerText="123"
        console.log('%c 🍲 container.innerText: ', 'font-size:20px;background-color: #ED9EC7;color:#fff;', container.innerText);
    </script>
</body>
</html>